{%extends "base.html"%}
{%block body%}
<h2>Races</h2>

<a href="{%url views.new%}">Create a New Race</a><br/><br/>

<table class="sample">
	<tr>

	    <th>Action</th>
		<th>List</th><th>Add</th><th>Name</th><th>Distance in miles</th><th>Date</th><th>Time</th><th>Location</th><th>Creation</th></tr>

{%for race in races%}
<tr class="{% cycle d0,d1 %}">

<td><a href="{%url views.delete race.key.id%}">Delete</a></td>
<td><a href="{%url views.listentries race.key.id%}">List Entries</a> </td>
<td><a href="{%url views.entry race.key.id%}">Sign up for this Event</a> </td>
<td><a href="{%url views.edit race.key.id%}">{{race.name|escape}} </td>
<td>	{{race.distance_in_miles|escape}} </td>
<td>	{{race.date|escape}} </td>
<td>	{{race.time|escape}}</td>
<td>	<a href="http://maps.google.com/maps?q={{race.location|escape}}">{{race.location|escape}}</a></td>
<td>  - created {{race.created|date:"Y/m/d H:i:s"}} by {{race.racedirector}}</td>
</tr>

{%endfor%}
</table>

<a href="{%url views.new%}">Create a New Race</a>

{%endblock%}
